<?php
$title=addslashes($_POST['title']);
$html=addslashes($_POST['html']);
$time=time();
$sql="INSERT INTO 
article(title,time,content,img,recommend,name_id)
VALUES('$title',$time,'$html',0,0,0)";
mysqli_select_db($mysql,'baidu');//切换数据库
$bool=mysqli_query($mysql,$sql);
//echo $sql;
//exit;
if ($bool)
{
    echo 'ok';
}else{
    echo 'on';
}
//var_export($_POST);
/*echo "time:".time();
echo "<br />";
echo date("Y---");
echo "<br />";*/


?>